widget path: Fix compiler warnings
authorMatthias Clasen <mclasen@redhat.com>
Sun, 31 May 2015 01:30:26 +0000 (21:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 2 Jun 2015 13:08:16 +0000 (09:08 -0400)
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.

gtk/gtkwidgetpath.c

index 8f3ae065a2b682572051b4845bed3968e421170a..45cda6bc66a2223400a78b4559707f3a443539ce 100644 (file)
@@ -332,15 +332,14 @@ gtk_widget_path_to_string (const GtkWidgetPath *path)
       if (elem->state)
         {
           GFlagsClass *fclass;
-          gint i;
 
           fclass = g_type_class_ref (GTK_TYPE_STATE_FLAGS);
-          for (i = 0; i < fclass->n_values; i++)
+          for (j = 0; j < fclass->n_values; j++)
             {
-              if (elem->state & fclass->values[i].value)
+              if (elem->state & fclass->values[j].value)
                 {
                   g_string_append_c (string, ':');
-                  g_string_append (string, fclass->values[i].value_nick);
+                  g_string_append (string, fclass->values[j].value_nick);
                 }
             }
           g_type_class_unref (fclass);